<?php
namespace app\index\Controller;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        if(empty(cookie('id'))){
            $this->error('请先登录');	#请先登录
            return $this->fetch('user/login');
        }


        return $this->fetch('user/index');
//        echo "您好：".cookie('username').',<a href="'.url('login/loginout').'">退出</a>';
    }

}
